<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/9/10 0010
 * Time: 15:24
 * 推送服务
 */
namespace Admin\Controller;

use Common\Controller\AdminbaseController;

class RiverrunController extends AdminbaseController
{

    public function index()
    {
        $this->display();
    }

    /**
     * 大河跑客地图
     */
    public function river_run_map()
    {
        $dispatch = M('dispatch');
        $this->assign('dispatch_count',$dispatch->where(array('company_id' => 2,'account_status'=>1))->count());
        $this->display();
    }

    /**
     * 大河跑客信息ajax数据源 company_id = 2
     */
    public function get_river_run_data()
    {
        $dispatch = M('dispatch');
        $ret = $dispatch->where(array('company_id' => 2,'work_status'=>1))->field('dispatch_name,mobile,latitude,longitude,place_up_time')->select();
        if ($ret) {
            RET(200, "获取跑客数据源成功！",$ret);
        } else {
            RET(400, "获取跑客数据源失败！");
        }

    }


}